Along with development of wireless network technologies, the Wireless Fidelity Peer to Peer (WiFi P2P) protocol specification released by the WiFi alliance supports formation of a P2P network including a plurality of WiFi devices, i.e., a P2P group, so that the WiFi devices may communicate with each other when there is no Access Point (AP). For example, a smart phone supporting the WiFi P2P protocol may directly establish a wireless connection with a smart television supporting the WiFi P2P protocol, and transmit screen data, media resources and the like of the smart phone to the smart television through the established wireless connection, to be displayed or played on the smart television.
In the related art, establishment of a wireless connection between WiFi devices supporting the WiFi P2P protocol includes two steps: a device discovery step and a P2P group establishment step. For example, to establish a wireless connection between a smart television and a smart phone, the smart television needs to start a specified application program configured for WiFi P2P connection, broadcast a probe-request data packet on channels 1, 6, and 11 at a 2.4 GHz frequency band through the specified application program, and then monitor probe-request data packets transmitted from other devices on a randomly selected frequency band. The smart phone uses the same manner of broadcasting and monitoring. The device discovery step is completed when the smart television and the smart phone respectively detect the probe request data packets sent by each other on frequency bands that they monitor. The smart television and the smart phone also send data packets to each other to negotiate about establishment of a P2P group and determine a group owner and a group client to complete the connection process.